package controllerInterfaces;

import java.util.List;

import javax.swing.JPanel;

import model.Project;
import modelInterfaces.IProject;
import pluginInterfaces.IRecommender;
import utils.weka.view.GenericObjectEditor;
import view.ViewRecommendersPanel;
import viewInterfaces.IViewRecommendersPanel;
import controller.ControllerMain;
import controller.ControllerRecommendersPanel;

/**
*
* Interface of {@link ControllerRecommendersPanel} controller class according to</br>
* Abstract Factory design pattern.
*/
public interface IControllerRecommendersPanel {
	
	/**
	 * Set the MVC++ Main Class for this controller.</br>
	 * ControllerMain is manipulable through {@link IControllerMain} interface
	 * @param	controllerMain	MVC++ Main Controller
	 * @see	ControllerMain
	 * @see IControllerMain
	 */	
	public void SetMainController(IControllerMain controllerMain);
	
	
	/**
	 * Get the list of {@link Recommender} from {@link ControllerMain}.</br>
	 * Each of the obtained {@link Recommender} are manipulable through its {@link IRecommender} interface.
	 * @return	list of recommendation algorithm configurations
	 * @see		ControllerMain
	 * @see		IControllerMain
	 */
	public List<IRecommender> getRecommenderList();
	
	
	/**
	 * Set the list of {@link Recommender} from {@link ControllerMain}.</br>
	 * Each of the saved {@link Recommender} are manipulable through its {@link IRecommender} interface.
	 * @param	recommenderList	list of recommendation algorithm configurations.
	 * @see		ControllerMain
	 * @see		IControllerMain 
	 */
	public void setRecommenderList(List<IRecommender> recommenderList);
	
	
	/**
	 * Get the Panel of View
	 * @return Panel of Recommenders
	 * @see ViewRecommendersPanel
	 */
	public JPanel getPanel();
	
	
	/**
	 * Start the recommender setup for add a recommendation algorithm</br>
	 * configuration ({@link Recommender}) from Recommenders Panel.
	 * @see Recommender
	 * @see IRecommender
	 */	
	public void addRecommenderSetup();

	
	/**
	 * Remove the selected recommender setup from Recommenders Panel.
	 * @param	index	index of selected recommendation algorithm configuration.
	 * @see 	Project
	 * @see		IProject
	 */	
	public void removeRecommenderSetup(int index);
	
	
	/**
	 * Copy the selected recommender setup from Recommender Panel.
	 * @param	index	index of selected recommendation algorithm configuration.
	 * @see 	Project
	 * @see		IProject
	 */		
	public void copyRecommenderSetup(int index);
	
	
	/**
	 * Start the recommender setup for edit a selected recommendation</br>
	 * algorithm configuration ({@link Recommender}) from Recommenders Panel.
	 * @param	index	index of selected recommendation algorithm configuration.
	 * @see		Recommender
	 * @see		IRecommender
	 */		
	public void editRecommenderSetup(int index);	

	
	/**
	 * Add the recommender setup ({@link Recommender}) by using Weka object.
	 * @param	m_Object	Object generated by Weka.
	 * @see		GenericObjectEditor
	 * @see 	Project
	 * @see		IProject
	 */	
	public void addRecommender(Object m_Object);

	
	/**
	 * Add the edited recommender setup ({@link Recommender}) by using Weka object.
	 * @param	m_Object	Object generated by Weka.
	 * @see		GenericObjectEditor
	 * @see 	Project
	 * @see		IProject
	 */		
	public void editRecommender(Object m_Object);
	
	
	/**
	 * Block all visual components of panel.
	 * @see ViewRecommendersPanel
	 */	
	public void blockAllComponents();


	/**
	 * UnBlock all visual components of panel.
	 * @see ViewRecommendersPanel.
	 */	
	public void unBlockAllComponents();

	
	/**
	 * Starts the Recommendation Algorithm Run Setup.
	 *  @param	selectedIndex	index of selected recommendation algorithm configuration from Recommender Panel.
	 */	
	public void startRun(int selectedIndex);
	
	
	/**
	 * Get View of this controller</br>
	 * This method is only used for realize unit testing.
	 * @return IViewRecommendersPanel
	 */
	public IViewRecommendersPanel GetView();	

}
